<template>
	<scroll-view class="content" :scroll-y="true">
		<view class="content_box">
			<view class="list" v-for="(v,k) in newList" :key="k" @click="link('/news/huizhanInfo/huizhanInfo?id='+v.exhid)">
				<image mode="widthFix" :src="v.imgpath"></image>
				<view class="right">
					<view class="title">{{v.title}}</view>
					<view class="news">
						<image mode="aspectFit" src="/static/image/dw.png"></image>
						<text>{{v.place}}</text>
					</view>
					<view class="news">
						<image mode="aspectFit" src="/static/image/sj.png"></image>
						<text>{{v.startdate}}</text>
					</view>
				</view>
			</view>
			<!-- <view class="loadmore">
				<uv-load-more v-if="isLoad" status="loadmore" />
				<uv-load-more v-if="!hasMore" status="nomore" />
			</view> -->
		</view>
	</scroll-view>
</template>

<script setup>
	import {
		ref,
		defineProps,
	} from 'vue'
	import {
		onLoad,
		onShow
	} from '@dcloudio/uni-app'
	import {
		homeApi
	} from "@/api/index"
	import {link} from '@/utils/utils.js'
	const newList = ref([])
	const pageSize = ref(20)
	const page = ref(1)
	const hasMore = ref(true)
	const isLoad = ref(false)
	onLoad(()=>{
		getGoodsList()
	})
	const getGoodsList = async () => {
		let data = {
			do:'txlzhanhui'
		}
		let res = await homeApi.publicGet(data)
		for (let i = 0; i < res.columns.length; i++) {
			if (res.columns[i].name == 'txlzhanhui') {
				newList.value = res.columns[i].items?res.columns[i].items:[]
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		width: 100%;
		height: 100%;
		overflow-y: auto;
		&_box{
			width: 100%;
			display: flex;
			flex-direction:column;
			.list{
				width: calc(100% - 60rpx);
				padding: 0rpx 30rpx;
				margin-top: 40rpx;
				display: flex;
				justify-content: space-between;
				image{
					width: 220rpx;
				}
				.right{
					width: calc(100% - 240rpx);
					.title{
						font-size: 28rpx;
						font-weight: bold;
					}
					.news{
						font-size: 24rpx;
						color: #888;
						display: flex;
						align-items: center;
						margin-top: 10rpx;
						image{
							width: 30rpx;
							height: 30rpx;
						}
						text{
							margin-left: 10rpx;
						}
					}
				}
			}
		}
	}
</style>